<!DOCTYPE html>
<html>
<head>
	<title>Fetch</title>
	<script type="text/javascript">
		function onFetch(){

			var url = "http://127.0.0.1/geoserver/radi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=radi%3Acountry&maxFeatures=50&outputFormat=json";

			fetch(url,{
				//options
				method : "GET",
			}).then(function(response) {
				return response.json();
			}).then(function(data) {
			  //console.log(data);
			  alert(data);
			}).catch(function(e) {
			  console.log("Oops, error");
			});
		}
	</script>
</head>
<body>
	<input type="button" value="Fetch" onclick="onFetch();">
</body>
</html>